import urllib2
import lxml.html

def http_get(url):
    '''
    Make an HTTP GET request for the given resource and return the response
    body as a string. 
    '''
    return urllib2.urlopen(url).read()

def build_tree(markup):
    '''
    Build an HTML document, a tree of lxml nodes, from the given markup
    string.
    '''
    return lxml.html.fromstring(markup)

